<!-- 商品详情页 -->
<template>
  <div class="detail-wrapper">
    <!-- navbar -->
    <div class="navbar">
      <div class="left">
        <img src="imgs/back.png" alt="" />
      </div>
      <div class="middle">商品信息</div>
    </div>
    <!-- 内容区域 -->
    <div class="content">
      <!-- 轮播图 -->
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item>1</van-swipe-item>
        <van-swipe-item>2</van-swipe-item>
        <van-swipe-item>3</van-swipe-item>
        <van-swipe-item>4</van-swipe-item>
      </van-swipe>
        <!-- 底部栏 -->
    <div class="bottom-bar">
      <div class="left-bar">
        <ul>
          <li>
            <img src="imgs/kefu.png" alt="" />
            <p>客服</p>
          </li>
          <li @click="toCart">
            <img src="imgs/dianpu.png" alt="" />
            <p>购物车</p>
          </li>
          <li>
            <img src="imgs/shoucang.png" alt="" />
            <p>收藏</p>
          </li>
        </ul>
      </div>
      <div class="right-bar">
        <div class="add-to-cart" @click="addCart">加入购物车</div>
        <div class="buy-at-once" @click="buyAtOnce">立即购买</div>
      </div>
    </div>
    </div>
  </div>
</template>


<script>
export default {};
</script>

<style scoped>
.navbar {
  z-index: 100;
  display: flex;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 44px;
  line-height: 44px;
  color: #fff;
  font-weight: 800;
  background-color: #f4a460;
}

.left {
  width: 0px;
}
.middle {
  flex: 1;
  font-size: 18px;
  text-align: center;
}
/* 轮播图 */
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 35vh;
  text-align: center;
  background-color: #39a9ed;
  margin-top: 44px;
  height: 35vh;
}
/* 底部栏 */
.bottom-bar {
  z-index: 100;
  display: flex;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  height: 60px;
  box-sizing: border-box;
  border-top: 1px solid #ccc;
  background-color: #fff;
}
.bottom-bar .left-bar ul {
  display: flex;
}
.bottom-bar .left-bar ul li {
  display: inherit;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 60px;
  font-size: 14px;
}
.bottom-bar .left-bar ul li img {
  width: 32px;
  height: 32px;
  margin: 4px 0;
}
.bottom-bar .right-bar {
  flex: 1;
  display: flex;
}
.bottom-bar .right-bar > div {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50%;
  height: 100%;
  color: #fff;
  font-weight: 700;
}
.bottom-bar .right-bar .add-to-cart {
  background-color: #F4A460;
}
.bottom-bar .right-bar .buy-at-once {
  background-color: red;
}
</style>